package com.fingard.dsp.bank.reqrespobj.currencyexchange;

import java.util.HashMap;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RetAtsBase;
import com.fingard.dsp.bank.reqrespobj.currencyexchange.detail.RetAtsExchangeDetail;
import com.fingard.xml.XmlTextWriter;

//结汇购汇提交或查询返回ATS通用对象
public class RetAtsExchange extends RetAtsBase {

	public RetAtsExchange(ReqRespHeader p_header){
		retHeader = p_header;
		retXmlWriter = new XmlTextWriter();//用于输出返回ATS的XML报文
	}
	
	public void writeRetDetail(RetAtsExchangeDetail p_detail){
		writeStart();//写返回ATS的统一头部信息
		retDetail = p_detail;
		
		p_detail.writeToXml(retXmlWriter);
		
		retXmlWriter.writeEndElement();
		writeEnd();//写结束
	}
	
	private RetAtsExchangeDetail retDetail;
	public HashMap<String,String> getRetAtsHashMap(){
		return retDetail.writeToHash();
    }
}
